#ifndef _CONDITION_H
#define _CONDITION_H
#include "MutexLock.h"
#include <pthread.h>
class condition
{
public:
    condition(MutexLock &mutex);
    ~condition();
    void wait();
    void notify();
    void notifyAll();

private:
    pthread_cond_t _cond;
    MutexLock &_mutex;
};

#endif
